-
Notifications
You must be signed in to change notification settings - Fork 675
ping4:Set the filter for reply packet. #3316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@13627105546 fix: |
d8a9600 to
de8acda
Compare
have been remove Change-ID with commits |
|
@13627105546 please fix |
de8acda to
bc23577
Compare
Done, have been add git commit message |
bc23577 to
e257f90
Compare
netutils/ping/icmp_ping.c
Outdated
| ****************************************************************************/ | ||
|
|
||
| #define ICMP_IOBUFFER_SIZE(x) (sizeof(struct icmp_hdr_s) + (x)) | ||
| #define ICMP_SET_FILTER(t) (UINT32_MAX - (1U << (t))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why sub UINT32_MAX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I have updated the macro to use bitwise NOT (~(1U << (t))) as suggested
Add setsockopt support to filter ICMP packets. Signed-off-by: liqinhui <[email protected]>
e257f90 to
9d80355
Compare
Note: Please adhere to Contributing Guidelines.
Summary
Impact
Testing